using System;
using System.Collections.Generic;
using FairyGUI;
using UnityEngine;

namespace Wwo
{
    public class GameLoginView : Window
    {
        public GameLoginView()
        {
        }

        protected override void OnInit()
        {
            this.contentPane = UIPackage.CreateObject("WaterWorld", "GameLogin").asCom;
            this.Center();

            GComponent newWorldBtn = this.contentPane.GetChild("NewWorld").asCom;
            newWorldBtn.onClick.Add(() =>
            {
                UISets.GetInstance().SwitchShow(UISets.GetInstance().m_NewWorldView);
            });

            GComponent loadWorldBtn = this.contentPane.GetChild("LoadWorld").asCom;
            loadWorldBtn.onClick.Add(() =>
            {
                UISets.GetInstance().SwitchShow(UISets.GetInstance().m_LoadWorldView);
            });

            GComponent exitBtn = this.contentPane.GetChild("Exit").asCom;
            exitBtn.onClick.Add(() =>
            {
                Application.Quit();
            });
        }

        override protected void OnShown()
        {
        }
    }
}